package com.ziyucoding.springboot.labs.lab4.event.events;

import lombok.Data;
import lombok.ToString;
import org.springframework.context.ApplicationEvent;

import java.time.Clock;

/**
 * 订单商品事件
 *
 * @author ziyucoding
 * @date 2022-10-25
 **/
public class OrderProductEvent extends ApplicationEvent {

    /**
     * 订单号
     */
    private String orderId;

    public OrderProductEvent(Object source, String orderId) {
        super(source);
        this.orderId = orderId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    @Override
    public String toString() {
        return "OrderProductEvent{" +
                "orderId='" + orderId + '\'' +
                ", source=" + source +
                '}';
    }
}
